package com.cgq.pro.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.cgq.base.entity.Base;

@Entity
@Table(name="fd_land")
public class Land  extends Base{
	/**  id，序号 */
	@Id
	@Column(name="id")
	private String id;
	
	/**
	 * 编号
	 */
	@Column
	private String num;

	/** 坐落位置 */
	@Column(name="location")
	private String location;

	/** 用途 */
	@Column
	private int useType;

	/** * 出让面积 */
	@Column
	private double sellArea;

	/**规划指标 */
	@Column
	private double quote;

	@ManyToOne
	@JoinColumn(name="areaDirection")
	private Region region;

	/** 类型 1为用地计划，2为土地出让，3为土地成交*/
	@Column
	private int type;
	/** 状态：0为删除，1为正常*/
	@Column
	private int status;

	/** 地块要点*/
	@Column
	private String point;

	/** 挂牌起始价格(万元)*/
	@Column
	private double start_price;

	/** 挂牌时间*/
	@Column
	private Date list_date;

	/** 容积率*/
	@Column
	private String capacity;

	/** 起始价格 */
	@Column
	private double initPrice;

	/**
	 * 成交价格
	 */
	@Column
	private double transPrice;

	/** 成交日期*/
	@Column
	private Date transDate;

	/** 竞拍人*/
	@Column
	private String bidder;

	@Column/**地块类型：1.点状地块 2.块状地块*/
	private String landType;
	@Column/**块状地块面积*/
	private String landArea;
	@Column
	private String points;
	
	@Column
	private Double lng;//经度
	@Column
	private Double lat;//纬度
	
	@Column
	private String markerName;//备注图标名称

	@OneToMany(fetch=FetchType.EAGER,cascade=CascadeType.ALL)
	@JoinColumn(name="land_id")
	private List<Attachment> attachments=new ArrayList<Attachment>();
	
	public Land() {}

	public Land(String name,String location,Double lng,Double lat){
		this.name=name;
		this.location=location;
		this.lng=lng;
		this.lat=lat;

	}

	public String getLandType() {
		return landType;
	}

	public void setLandType(String landType) {
		this.landType = landType;
	}

	public String getLandArea() {
		return landArea;
	}

	public void setLandArea(String landArea) {
		this.landArea = landArea;
	}

	public String getPoints() {
		return points;
	}

	public void setPoints(String points) {
		this.points = points;
	}

	public String getId() {

		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public int getUseType() {
		return useType;
	}

	public void setUseType(int useType) {
		this.useType = useType;
	}

	public double getSellArea() {
		return sellArea;
	}

	public void setSellArea(double sellArea) {
		this.sellArea = sellArea;
	}

	public double getQuote() {
		return quote;
	}

	public void setQuote(double quote) {
		this.quote = quote;
	}
	
	public Region getRegion() {
		return region;
	}

	public void setRegion(Region region) {
		this.region = region;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getPoint() {
		return point;
	}

	public void setPoint(String point) {
		this.point = point;
	}

	public double getStart_price() {
		return start_price;
	}

	public void setStart_price(double start_price) {
		this.start_price = start_price;
	}

	public Date getList_date() {
		return list_date;
	}

	public void setList_date(Date list_date) {
		this.list_date = list_date;
	}

	public String getCapacity() {
		return capacity;
	}

	public void setCapacity(String capacity) {
		this.capacity = capacity;
	}

	public double getInitPrice() {
		return initPrice;
	}

	public void setInitPrice(double initPrice) {
		this.initPrice = initPrice;
	}

	public double getTransPrice() {
		return transPrice;
	}

	public void setTransPrice(double transPrice) {
		this.transPrice = transPrice;
	}

	public Date getTransDate() {
		return transDate;
	}

	public void setTransDate(Date transDate) {
		this.transDate = transDate;
	}

	public String getBidder() {
		return bidder;
	}

	public void setBidder(String bidder) {
		this.bidder = bidder;
	}
	
	public Double getLng() {
		return lng;
	}

	public void setLng(Double lng) {
		this.lng = lng;
	}

	public Double getLat() {
		return lat;
	}

	public void setLat(Double lat) {
		this.lat = lat;
	}

	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}

	public String getMarkerName() {
		return markerName;
	}

	public void setMarkerName(String markerName) {
		this.markerName = markerName;
	}
	
}
